<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
   <link rel="stylesheet" type="text/css" href="{MODULE_URL}template/mobile/style/style1/static/css/region.css" />
    <!--css-->
    <link rel="stylesheet" type="text/css" href="{MODULE_URL}template/mobile/style/style1/static/css/fled.css" />
    <style type="text/css">
    body{
      font-size: 12px;
    }
    </style>
    <script type="text/javascript" src="{$_W['siteroot']}app/resource/js/lib/jquery-1.11.1.min.js"></script>
    <script type="text/javascript">

    // jssdk config 对象
    jssdkconfig = {php echo json_encode($_W['account']['jssdkconfig']);} || {};

    // 是否启用调试
    jssdkconfig.debug = false;

    jssdkconfig.jsApiList = [

        'previewImage',

    ];
    </script>
    <title>{$region['title']}</title>
</head>

<body>
    <!--page-->
    <div id="page">
        <header id="header">
            <div class="header_div">
                <div id="left_div" onClick="window.location.href='{php echo $this->createMobileUrl('fled',array('op' => 'list'))}'"></div>
                <div id="middle_div">
                    <h1 id="title">查看{$item['name']}信息</h1></div>
                <div id="right_div">
                    <div class="right_bottom"></div>
                    <div class="right_img"></div>
                </div>
            </div>
        </header>
        <!--cont-->
        <div class="cont" style="padding-bottom:100px;">
            <aside id="houseimg_img" onClick="showImg()">
           
                <div class="house_img"><img src="{$imgs[0]['src']}" style="max-height:300px;_height:expression(this.height> 300 ? " 300px " : this.height);margin:0 auto;"/></div>
                <div style="display:none" id="previewImage">
                {loop $imgs $img}
                <img  src="{$img['src']}" />
                {/loop}

                </div>
                <div class="house_b"><span>共{php echo count($imgs)}张图</span></div>
            </aside>
            <aside id="houseimg_title">
                <h1 class="house_title">{$item['title']}</h1>
                <div class="fab_time">发布时间：{php echo date('Y-m-d H:i:s',$item['createtime'])}</div>
            </aside>
            <section class="housexq_div">
                <div class="house_xq">
                    <div class="xq_l">
                        <ul class="house_xqul">
                            <li>
                                <label>类别：</label>{$item['name']}类</li>
                            <li>
                                <label>新旧程度：</label>{$item['rolex']}</li>
                            <li>
                                <label>联系人：</label>{$item['realname']}</li>
                            <li>
                                <label>是否成交：</label><span class="blue">{if $item['status']}已成交{else}还未成交{/if}</span></li>
                        </ul>
                    </div>
                    <div class="xq_r">
                        <span class="price">{if empty($item['zprice'])}面议{else}{$item['zprice']}{/if}</span>
                    </div>
                </div>
                <a href="tel:{$item['mobile']}" class="contact_a">立即联系</a>
            </section>
            <aside class="housexq_div">
                <h2>详情描述：</h2>
                <ul class="house_xqul">
                    <li>
                        {$item['description']}
                    </li>
                </ul>
            </aside>
        </div>
    </div>
 <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">

wx.config(jssdkconfig);

function showImg(){

   var imgArray = [];
        var curImageSrc = $(".house_img img").attr('src');
        if (curImageSrc) {
            $('#previewImage img').each(function(index, el) {
                var itemSrc = $(this).attr('src');
                imgArray.push(itemSrc);
            });
  
                wx.previewImage({
                    current: curImageSrc,
                    urls: imgArray
                });
        
        } 
}


</script>
</body>

</html>
